<template>
  <div class="smart-home">
    <div class="container">
      <div class="back-button">
        <router-link to="/" class="back-btn">
          <i class="fas fa-arrow-left"></i>
          {{ t('backToHome') }}
        </router-link>
      </div>

      <div class="product-hero">
        <div class="product-hero-content">
          <h1>{{ t('smartHomeSystem') }}</h1>
          <p>{{ t('professionalInstallation') }}</p>
          <div class="price-tag">¥15,999</div>
        </div>
      </div>

      <div class="content-grid">
        <div class="content-section">
          <h2>
            <i class="fas fa-star"></i>
            {{ t('productHighlights') }}
          </h2>
          <ul class="feature-list">
            <li><i class="fas fa-check"></i>{{ t('wholeHouseControl') }}</li>
            <li><i class="fas fa-check"></i>{{ t('voiceControl') }}</li>
            <li><i class="fas fa-check"></i>{{ t('mobileAppControl') }}</li>
            <li><i class="fas fa-check"></i>{{ t('energySaving') }}</li>
            <li><i class="fas fa-check"></i>{{ t('securityProtection') }}</li>
          </ul>
        </div>

        <div class="content-section">
          <h2>
            <i class="fas fa-cogs"></i>
            {{ t('systemComponents') }}
          </h2>
          <ul class="feature-list">
            <li><i class="fas fa-lightbulb"></i>{{ t('smartLighting') }}</li>
            <li><i class="fas fa-thermometer-half"></i>{{ t('temperatureControl') }}</li>
            <li><i class="fas fa-shield-alt"></i>{{ t('securityMonitoring') }}</li>
            <li><i class="fas fa-music"></i>{{ t('backgroundMusic') }}</li>
            <li><i class="fas fa-wifi"></i>{{ t('networkHub') }}</li>
          </ul>
        </div>
      </div>

      <div class="features-grid">
        <div class="feature-card">
          <div class="feature-icon">
            <i class="fas fa-mobile-alt"></i>
          </div>
          <h3>{{ t('mobileControl') }}</h3>
          <p>{{ t('mobileControlDesc') }}</p>
        </div>

        <div class="feature-card">
          <div class="feature-icon">
            <i class="fas fa-microphone"></i>
          </div>
          <h3>{{ t('voiceControl') }}</h3>
          <p>{{ t('voiceControlDesc') }}</p>
        </div>

        <div class="feature-card">
          <div class="feature-icon">
            <i class="fas fa-clock"></i>
          </div>
          <h3>{{ t('timerControl') }}</h3>
          <p>{{ t('timerControlDesc') }}</p>
        </div>

        <div class="feature-card">
          <div class="feature-icon">
            <i class="fas fa-brain"></i>
          </div>
          <h3>{{ t('aiLearning') }}</h3>
          <p>{{ t('aiLearningDesc') }}</p>
        </div>
      </div>

      <div class="cta-section">
        <h2>{{ t('experienceSmartLiving') }}</h2>
        <p>{{ t('professionalInstallation') }}</p>
        <div class="cta-buttons">
          <button class="btn btn-primary">{{ t('buyNow') }}</button>
          <button class="btn btn-secondary">{{ t('scheduleDemo') }}</button>
          <button class="btn btn-secondary">{{ t('technicalConsultation') }}</button>
        </div>
      </div>
    </div>
  </div>
</template>

<script setup>
import { useI18n } from '../composables/useI18n'

const { t } = useI18n()
</script>

<style scoped>
.smart-home {
  padding-top: 80px;
  min-height: 100vh;
  background: #f8f9fa;
}

.back-button {
  margin-bottom: 2rem;
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(52, 152, 219, 0.1);
  color: #3498db;
  padding: 0.5rem 1rem;
  border-radius: 25px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.back-btn:hover {
  background: rgba(52, 152, 219, 0.2);
  transform: translateX(-5px);
}

.product-hero {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 2rem;
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

@media (min-width: 768px) {
  .product-hero {
    padding: 4rem 0;
    margin-bottom: 3rem;
  }
}

.product-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.product-hero-content {
  position: relative;
  z-index: 2;
  padding: 0 1rem;
}

.product-hero h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease-out;
}

@media (min-width: 768px) {
  .product-hero h1 {
    font-size: 3rem;
  }
}

.product-hero p {
  font-size: 1rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  animation: fadeInUp 1s ease-out 0.3s both;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .product-hero p {
    font-size: 1.2rem;
  }
}

.price-tag {
  font-size: 1.5rem;
  font-weight: bold;
  color: #ffd700;
  animation: fadeInUp 1s ease-out 0.6s both;
}

@media (min-width: 768px) {
  .price-tag {
    font-size: 2rem;
  }
}

.content-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .content-grid {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
  }
}

.content-section {
  background: white;
  padding: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

@media (min-width: 768px) {
  .content-section {
    padding: 2rem;
  }
}

.content-section:hover {
  transform: translateY(-5px);
}

.content-section h2 {
  color: #2c3e50;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
}

@media (min-width: 768px) {
  .content-section h2 {
    font-size: 1.5rem;
  }
}

.content-section h2 i {
  color: #3498db;
}

.feature-list {
  list-style: none;
  padding: 0;
}

.feature-list li {
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

@media (min-width: 768px) {
  .feature-list li {
    font-size: 1rem;
  }
}

.feature-list i {
  color: #27ae60;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 3rem;
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  background: white;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  text-align: center;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-icon {
  font-size: 2rem;
  color: #3498db;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .feature-icon {
    font-size: 2.5rem;
  }
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

@media (min-width: 768px) {
  .feature-card h3 {
    font-size: 1.2rem;
  }
}

.feature-card p {
  color: #7f8c8d;
  font-size: 0.9rem;
  line-height: 1.5;
}

.cta-section {
  background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
  color: white;
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .cta-section {
    padding: 3rem;
    margin-top: 3rem;
  }
}

.cta-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .cta-section h2 {
    font-size: 2rem;
  }
}

.cta-section p {
  font-size: 1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

@media (min-width: 768px) {
  .btn {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}

.btn-primary {
  background: linear-gradient(45deg, #3498db, #2980b9);
  color: white;
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
</style>
